#include "piece.hpp"
#include "piece_car.hpp"

Piece *pieces[33];

Piece &Piece::operator=(Piece &&pie){
	coor = std::move(pie.coor);
	color = pie.color;
	life = pie.life;
	return *this;
}

Piece::Piece(const Piece &pie){
	coor = pie.coor;
	color = pie.color;
	life = pie.life;
	pt = pie.pt;
}

void Piece::updateCoor(GameMap &gm, const Coordinate &goal)noexcept{
	gm[coor] = PieceType::NONE;
	gm[goal] = pt;
	coor = goal;
}

Piece::Piece(Piece &&pie){
	coor = std::move(pie.coor);
	color = pie.color;
	life = pie.life;
	pt = pie.pt;
}
